home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / f90 / scan.z / scan
Text File  |  1998-10-30  |  2KB  |  59 lines

  1. SCAN(3I)                                               Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      SSCCAANN - Scans a string for any one of the characters in a set of
  6.      characters
  7.  
  8. SSYYNNOOPPSSIISS
  9.      SSCCAANN (([SSTTRRIINNGG==]_s_t_r_i_n_g,, [SSEETT==]_s_e_t [,,[BBAACCKK==]_b_a_c_k]))
  10.  
  11. IIMMPPLLEEMMEENNTTAATTIIOONN
  12.      UNICOS, UNICOS/mk, and IRIX systems
  13.  
  14. SSTTAANNDDAARRDDSS
  15.      Fortran 90
  16.  
  17. DDEESSCCRRIIPPTTIIOONN
  18.      The SSCCAANN intrinsic function scans a string for any one of the
  19.      characters in a set of characters.  It accepts the following
  20.      arguments:
  21.  
  22.      _s_t_r_i_n_g    Must be of type character.
  23.  
  24.      _s_e_t       Must be of type character.
  25.  
  26.      _b_a_c_k      Must be of type logical.  If _b_a_c_k is omitted, a value of
  27.                false is assumed.
  28.  
  29.      SSCCAANN is an elemental function.  The name of this intrinsic cannot be
  30.      passed as an argument.
  31.  
  32. RREETTUURRNN VVAALLUUEESS
  33.      SSCCAANN returns the character position of the first character in _s_t_r_i_n_g
  34.      that matches any characters in _s_e_t.  The result is a default integer.
  35.  
  36.      If _b_a_c_k is absent or present with value false and if _s_t_r_i_n_g contains
  37.      at least one character that is in _s_e_t, the value of the result is the
  38.      position of the leftmost character of _s_t_r_i_n_g that is in _s_e_t.
  39.  
  40.      If _b_a_c_k is present with the value true, and if _s_t_r_i_n_g contains at
  41.      least one character that is in _s_e_t, the value of the result is the
  42.      position of the rightmost character of _s_t_r_i_n_g that is in _s_e_t.
  43.  
  44.      SSCCAANN returns zero if no character in _s_t_r_i_n_g is in _s_e_t, or if the
  45.      length of _s_t_r_i_n_g is zero.
  46.  
  47. EEXXAAMMPPLLEESS
  48.      Example 1:  The statement SSCCAANN((''FFOORRTTRRAANN'',, ''TTRR'')) returns the value 3.
  49.  
  50.      Example 2:  The statement SSCCAANN((''FFOORRTTRRAANN'',, ''TTRR'',, BBAACCKK==..TTRRUUEE..)) returns
  51.      the value 5.
  52.  
  53.      Example 3:  The statement SSCCAANN((''FFOORRTTRRAANN'',, ''BBCCDD'')) returns the value 0.
  54.  
  55. SSEEEE AALLSSOO
  56.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  57.      printed version of this man page.
  58.  
  59.